<?php
require_once("../../bbs/model/conn.php");
updateRole($_GET['uId'], $_GET['role']);
/**
 * 更新用户角色
 * @param $userId int 用户ID
 * @param $role int 角色ID
 * @return int
 */
function updateRole($userId, $role)
{
  $sql = "update tbl_user set role ='$role' where uId = $userId";
  exec_update($sql);
  header('Location:../views/indexBms.php?action=setting');  
  return 1;
}
?>